<html>
<head><meta charset="utf-8"><title>tweak wording &quot;try expression alternatives&quot; #71309 · t-compiler/wg-diagnostics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/index.html">t-compiler/wg-diagnostics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309.html">tweak wording &quot;try expression alternatives&quot; #71309</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205663263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/tweak%20wording%20%22try%20expression%20alternatives%22%20%2371309/near/205663263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yuki Okushi <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309.html#205663263">(Aug 01 2020 at 04:14)</a>:</h4>
<p>I'm thinking what's the best way to improve on <a href="https://github.com/rust-lang/rust/issues/71309">#71309</a>.<br>
It's the simplest way to tweak the wording "try expression alternatives". I think it should (also?) mention <code>?</code> operator, "<code>?</code> operator has incompatible types" is better? I'm not sure "try expression alternatives" is still useful for users here</p>



<a name="205679837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/tweak%20wording%20%22try%20expression%20alternatives%22%20%2371309/near/205679837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yuki Okushi <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309.html#205679837">(Aug 01 2020 at 12:42)</a>:</h4>
<p><span class="user-mention" data-user-id="119031">@Esteban Küber</span> thoughts?</p>



<a name="205687533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/tweak%20wording%20%22try%20expression%20alternatives%22%20%2371309/near/205687533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309.html#205687533">(Aug 01 2020 at 16:12)</a>:</h4>
<p>I think something along the lines of "? cannot convert from x to y"<br>
It also stands up to me that the suggestion in that report is incorrect as it is using the span for the entire expression when it should not have covered the ? making applying the suggestion cause another error</p>



<a name="205687537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/tweak%20wording%20%22try%20expression%20alternatives%22%20%2371309/near/205687537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309.html#205687537">(Aug 01 2020 at 16:12)</a>:</h4>
<p><span class="user-mention" data-user-id="217081">@Yuki Okushi</span></p>



<a name="205687545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/tweak%20wording%20%22try%20expression%20alternatives%22%20%2371309/near/205687545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309.html#205687545">(Aug 01 2020 at 16:12)</a>:</h4>
<p>But yes, most of the fix can be just wording</p>



<a name="205687552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/tweak%20wording%20%22try%20expression%20alternatives%22%20%2371309/near/205687552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309.html#205687552">(Aug 01 2020 at 16:12)</a>:</h4>
<p>Maybe add a help explaining what ? expands to</p>



<a name="205690143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/tweak%20wording%20%22try%20expression%20alternatives%22%20%2371309/near/205690143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yuki Okushi <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309.html#205690143">(Aug 01 2020 at 17:19)</a>:</h4>
<p>makes sense, okay I'll try to tweak it</p>



<a name="205690283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/tweak%20wording%20%22try%20expression%20alternatives%22%20%2371309/near/205690283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yuki Okushi <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309.html#205690283">(Aug 01 2020 at 17:23)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119031">Esteban Küber</span> <a href="#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309/near/205687533">said</a>:</p>
<blockquote>
<p>It also stands up to me that the suggestion in that report is incorrect as it is using the span for the entire expression when it should not have covered the ? making applying the suggestion cause another error</p>
</blockquote>
<p>hmm I haven't figured out such a case enough though</p>



<a name="205698341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/tweak%20wording%20%22try%20expression%20alternatives%22%20%2371309/near/205698341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yuki Okushi <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/tweak.20wording.20.22try.20expression.20alternatives.22.20.2371309.html#205698341">(Aug 01 2020 at 21:08)</a>:</h4>
<p><span class="user-mention" data-user-id="119031">@Esteban Küber</span> okay, submitted <a href="https://github.com/rust-lang/rust/issues/75029">#75029</a> (sorry for too many assignments!)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>